package com.stoneframe.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.stoneframe.dao.DaoSupport;
import com.stoneframe.util.baseApp.PageData;

@Service(value="loginService")
public class LoginService {
	
	@Resource(name="daoSupport")
	private DaoSupport dao;
	
	/**
	 * 根据用户名和密码获取用户信息
	 * */
	public PageData getUserByNameAndPwd(PageData pd) throws Exception{
		return (PageData)dao.findForObject("LoginMapper.getUserByNameAndPwd", pd);
	}
	
	/**
	 * 登录成功后修改信息
	 * */
	public void updateLastLogin(PageData pd) throws Exception{
		dao.edit("LoginMapper.updateLastLogin", pd);
	}
	

}
